#pragma once

#include <mathlib/intype.h>
#include <graphic/intype.h>

BEGIN_NAMESPACE_OXGE

class BoundingBox;

class RENDERER_TRANSFER Camera :public oxgeClass<Camera>
{
public:

	Camera();

	Camera& Set(const Point3& pos, const Point3& lookPt, const Vector3& upDir);

	Camera& SetPosition(const Point3& pos){ m_vPosition = pos ; return *this; }
	Camera& SetFocusPoint(const Point3& pos){ m_vFocusPoint = pos; return *this; }
	Camera& SetUpDir(const Vector3& dir);
 
	inline Vector3 GetUpDir()const{ return m_upDir; }
	inline Point3 GetFocusPoint()const{ return m_vFocusPoint; }
	inline Point3 GetPosition()const{ return m_vPosition; }

	Camera& Transform(const Transformation3D&);
	Camera& SetAspect(Real aspect){ m_aspectRatio = aspect; return *this; }


public:
	Vector3 m_upDir;
	Point3 m_vPosition;
	Point3 m_vFocusPoint;

	Real m_dNear;
	Real m_dFar;
	Real m_dfovy;
	Real m_aspectRatio;

};


END_NAMESPACE_OXGE